import calendar
c1 = calendar.calendar(2019)
print(c1)
print(type(c1))
# <class 'str'>

# m1 = calendar.month(2019,6)
# print(m1)
# print(type(m1))
# # <class 'str'>
#
# print(calendar.isleap(2019))
# #  判断闰年平年
# print(calendar.leapdays(1999,2000))
# #  [1999,2000)

# 判断两个年份之间有几个闰年
# def leapday(y1,y2):
#     count = 0
#     for i in range(y1,y2):
#         if calendar.isleap(i):
#             count += 1
#     return count

c2 = calendar.Calendar()
print(c2.monthdays2calendar(2019,5))  #  2 two to  4 four  False
#  几号 周几